package Ebook.entity;

import java.util.ArrayList;

public class PageBean<T> {
    private int totalCount;
	
	private int totalPage;
	
	private String category;
	private String type;
	private int pageCode;
	
	private int pageSize;
	
	private ArrayList<T> list;

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getTotalPage() {
		int result = totalCount % pageSize;
		
		if(result != 0){
			return totalCount / pageSize +1;
		}else{
			return totalCount / pageSize;
		}
	}

	

	public int getPageCode() {
		return pageCode;
	}

	public void setPageCode(int pageCode) {
		this.pageCode = pageCode;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public ArrayList<T> getList() {
		return list;
	}

	public void setList(ArrayList<T> list) {
		this.list = list;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}
